package com.sunlgggg.view;


import sun.rmi.runtime.Log;

import javax.swing.*;
import java.awt.*;
import java.util.Objects;

/**
 * @author sunlggggg
 * @date 2016/12/20
 */
public class Imis extends JFrame {

    public Imis() throws HeadlessException {
        Login login = new Login();
        login.dispose();

        new Thread(() -> {
            while (true) {
                if (Login.account != null && !Objects.equals(Login.account, "")) {
                    // new MainFrame(Login.account);
                    login.setVisible(false);
                    return;
                }
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }

            }
        }).start();
    }

    public static void main(String[] args) {

    }
}
